#!/bin/bash
#SBATCH --account=PAS2493
#SBATCH --nodes=1
#SBATCH --exclusive
#SBATCH -t 0-03:00:00
#SBATCH -J alecia
#SBATCH -o out.txt
#SBATCH -e err.txt

set -xe

module load oneapi/2025.0.4

export MV2_ENABLE_AFFINITY=0
export OMP_NUM_THREADS=$SLURM_CPUS_ON_NODE

echo "TMPDIR is $TMPDIR"

echo "$SLURM_JOB_NUM_NODES nodes with $SLURM_CPUS_ON_NODE processors each." > log.txt

cd $SLURM_SUBMIT_DIR
date >> log.txt
make clean &>> log.txt
make -j$SLURM_CPUS_ON_NODE &>> log.txt

date >> log.txt
./alecia_parallel &>> log.txt
make clean &>> log.txt

date >> log.txt
echo "End." &>> ./log.txt

./gss_extract.sh

